public class Three {
    public String solve (String ss, String tt) {
        char[] s=new StringBuffer(ss).reverse().toString().toCharArray();
        char[] t=new StringBuffer(tt).reverse().toString().toCharArray();
        int m=s.length,n=t.length;
        int[] tmp=new int[m+n];
        //1、无进位相乘相加
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                tmp[i+j]+=(s[i]-'0')*(t[j]-'0');
            }
        }
        //2、处理进位
        StringBuffer ret=new StringBuffer();
        int c=0;
        for (int x :
                tmp) {
            c += x;
            ret.append((char)(c%10+'0'));
            c/=10;
        }
        while (c!=0){
            ret.append((char)(c%10+'0'));
            c/=10;
        }
        //3.处理签导零
        while (ret.length()>1&&ret.charAt(ret.length()-1)=='0'){
            ret.deleteCharAt(ret.length()-1);
        }
        return ret.reverse().toString();

    }
}
